package com.sun.commons.utils;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;

public class CollectionUtils {
    private CollectionUtils(){

    }

    public static <T> List<T> asList(Iterable<T> source){
        return asStream(source).toList();
    }

    public static <T> Stream<T> asStream(Iterable<T> source){

        return StreamSupport.stream(source.spliterator(), false);
    }
}
